﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="qlconsultingdetail.ascx.cs" Inherits="admin_qlconsultingdetail" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Label ID="info" runat="server" Text=""></asp:Label>
<center>
<table width="100%">
    <tr>
        <td>Tên: </td>
        <td>
            <asp:TextBox ID="name" runat="server" Width="346px" 
                ></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Địa chỉ: </td>
        <td>
            <asp:TextBox ID="address" runat="server" Width="346px"></asp:TextBox>
            </td>
    </tr>
    <tr>
        <td>Điện thoại: </td>
        <td>
            <asp:TextBox ID="phone" runat="server" Width="346px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Email: </td>
        <td>
            <asp:TextBox ID="email" runat="server" Width="346px" ></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Hình ảnh: </td>
        <td>
            <asp:FileUpload ID="img" runat="server" /></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td colspan="2"><center>
            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Trở về" />
&nbsp;<asp:Button runat="server" ID="addbt" Text="Thêm" onclick="addbt_Click"/></center></td>
    </tr>
</table>
</center>
<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
    DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
    onrowcommand="GridView1_RowCommand" onrowcreated="GridView1_RowCreated" 
    onrowediting="GridView1_RowEditing" PageSize="5" Width="100%" 
    DataKeyNames="id" EnableModelValidation="True" 
    onrowdeleting="GridView1_RowDeleting">
    <RowStyle BackColor="#EFF3FB" VerticalAlign="Middle" />
    <EmptyDataRowStyle VerticalAlign="Middle" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="White" ForeColor="#459300" HorizontalAlign="Center" />
    <EmptyDataTemplate>
        <asp:Label ID="Label3" runat="server" Text="Chưa có dữ liệu"></asp:Label>
    </EmptyDataTemplate>
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#57A000" Font-Bold="True" ForeColor="White" />
    <Columns>
        <asp:TemplateField HeaderText="id" SortExpression="id" Visible="False">
            <EditItemTemplate>
                <asp:Label ID="id" runat="server" Text='<%# Eval("id") %>'></asp:Label>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="id" runat="server" Text='<%# Bind("id") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="name" HeaderText="Tên" SortExpression="name" 
            ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:BoundField>
        <asp:BoundField DataField="address" HeaderText="Địa chỉ" ItemStyle-HorizontalAlign="Center"
            SortExpression="address" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:BoundField>
        <asp:BoundField DataField="phone" HeaderText="Điện thoại" ItemStyle-HorizontalAlign="Center"
            SortExpression="phone" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:BoundField>
        <asp:BoundField DataField="email" HeaderText="Email" SortExpression="email" 
            ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:BoundField>
        <asp:TemplateField HeaderText="consultingId" SortExpression="consultingId" 
            Visible="False">
            <EditItemTemplate>
                <asp:Label ID="cid" runat="server" Text='<%# Bind("consultingId") %>'></asp:Label>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="cid" runat="server" Text='<%# Bind("consultingId") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:CommandField ButtonType="Button" EditText="Sửa" ShowEditButton="True" 
            ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:CommandField>
        <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:Button ID="Button1" runat="server" CausesValidation="true" 
                        CommandName="Delete" Text="Xoá" OnClientClick="return confirm('Bạn thật sự muốn xóa dữ liệu này?')" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
        <asp:ButtonField ButtonType="Button" CommandName="addlang" Text="Ngôn ngữ" 
            ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:ButtonField>
    </Columns>
    <EditRowStyle BackColor="#003366" VerticalAlign="Middle" />
    <AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:canhbuomxanhconnectionstring %>" 
    
    SelectCommand="SELECT * FROM [ConsultingDetails] WHERE ([consultingId] = @consultingId)">
    <SelectParameters>
        <asp:QueryStringParameter Name="consultingId" QueryStringField="id" 
            Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>

